#pragma once

#ifndef NULL
	#define NULL 0
#endif

#define NETWORK_NO_DATA								0			// signifies that no data follows a particular message
#define NETWORK_SUCCESS								0			// operation was successful
#define NETWORK_CLIENT								0x0001		// indicates that program is to act as a host
#define NETWORK_HOST								0x0002		// indicates that program is to act as a client
#define NETWORK_REQUEST_CHATBOX_ADD_MESSAGE			0x0003		// indicates that a client has a new message in the chatbox, and for the server to tell the other clients
#define NETWORK_CHATBOX_NEW_MESSAGE					0x0004		// the server has a new message for the client to add to their chatbox, followed by the message string
#define NETWORK_REQUEST_CLIENT_INDEX				0x0005		// client wants to know what his index is
#define NETWORK_GIVE_PLAYER_INFO					0x0006		// signify that the an established client is giving his info to a player that just joined
#define NETWORK_NEW_PLAYER_INFO						0x0007		// signify that a new player is giving his info
#define NETWORK_UPDATE_ENTITY						0x0008		// should follow with the index of the player and new position
//#define NETWORK_REQUEST_WORLD_SEED				0x0009		// OUTDATED: 0x000A is now used to send the seed files
#define NETWORK_REQUEST_WORLD_SEED_FILES			0x000A		// same as above, though it requests the world files be sent instead of the seed
#define NETWORK_UPDATE_WORLD_BLOCK					0x000B		// client needs to tell others to modify a block in a certain manner
//#define NETWORK_STILL_ALIVE						0x000C		// OUTDATED: Found a more efficient way to do this
#define NETWORK_CLIENT_DISCONNECT					0x000D		// a client has disconnected from the server
#define NETWORK_UPDATE_PLAYER_EQUIPS				0x000E		// update's a players list of equipped item
#define NETWORK_SEND_PROJECTILE						0x000F
#define NETWORK_SEND_ENTITY							0x0010		// for sending npc entities over the network, for sending players, use 0x0006
#define NETWORK_UPDATE_ENEMY						0x0011		// update an npc enemy's 
#define NETWORK_UPDATE_ENTITY_HEALTH				0x0012		// update the amount of health an entity has

/* Error codes */
#define NETWORK_ERR_INVALID_PROGTYPE				0x0100
#define NETWORK_ERR_HOST_NDEF						0x0101		// Host IP was undefined
#define NETWORK_ERR_HOST_INVALID					0x0102		// Host IP was invalid
#define NETWORK_ERR_OFFLINE							0x0103		// Playing an offline game
#define NETWORK_ERR_INVALID_DATA					0x0104		// Data being sent was invalid
#define NETWORK_ERR_HOST_DISCONNECTED				0x0105		// Host is no longer available to connect to
